
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 事件列表
export function getEventList(params) {
  return request({
    url: host + '/event/list',
    method: 'get',
    params
  })
}

// 新增事件
export function addEvent(data) {
  return request({
    url: host + '/event/save',
    method: 'post',
    data
  })
}

// 修改事件
export function updateEvent(data) {
  return request({
    url: host + '/event/update',
    method: 'post',
    data
  })
}

// 获取事件详情
export function getEvent(params) {
  return request({
    url: host + '/event/detail',
    method: 'get',
    params
  })
}

// 删除事件
export function deleteEvent(data) {
  return request({
    url: host + '/event/delete',
    method: 'post',
    data
  })
}
